package ru.susu.algebra.centralunits.alternating.tex;

import java.io.File;

import org.apache.commons.io.FileUtils;

import ru.susu.algebra.jtex.ITexElement;
import ru.susu.algebra.jtex.StringTexElement;
import ru.susu.algebra.methods.IMathMethodPS;
import ru.susu.algebra.properties.IPropertySource;

/**
 * @author akargapolov
 * @since: 26.08.2010
 */
public class HeadAnTexGenerator implements IMathMethodPS<ITexElement>
{
	private static final String TEX_HEAD_FILENAME = "resources/resources/tex/article_head.tex";

	@Override
	public ITexElement run(IPropertySource ps) throws Exception
	{
		return StringTexElement.text(FileUtils.readFileToString(new File(TEX_HEAD_FILENAME), "utf8"));
	}

}
